﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class MasterPage : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["Login"] != null) {
            Label lb = this.FindControl("lbUser") as Label;
            lb.Text = Session["Login"].ToString();
            Control ctr = Page.LoadControl("adminToolMenu.ascx");
            ctr.ID = "AdminToolMenu";
            ContentPlaceHolder pld = this.FindControl("plAdminToolMenu") as ContentPlaceHolder;
            pld.Controls.Add(ctr);
        }
    }
}
